In this step, you'll create a Silverlight application and add a C1PdfDocument object.
-
In Visual Studio, select File | New | Project.
-
In the New Project dialog box, select a language in the left pane, and in the templates list select WPF Application or Silverlight Application. Enter a Name for your project and click OK. The New WPF or Silverlight Application dialog box will appear.
-
Click OK to close the New WPF Application or New Silverlight Application dialog box and create your project.
-
Right-click the project name in the Solution Explorer and select Add Reference.
-
In the Add Reference dialog box, locate and select the C1.WPF.Pdf.dll or the C1.Silverlight.Pdf.dll and click OK to add the reference to your project.
-
Open the MainPage.xaml.cs file in Visual Studio and add the following code at the top of the page with the using statements:
using C1.Silverlight.Pdf;
using System.IO;
-
Then add the following code for the MainPage:
// Create the C1PdfDocument object
C1PdfDocument pdf = new C1PdfDocument();
public MainPage()
{
InitializeComponent();
// Make the window hit test visible.
LayoutRoot.Background = new SolidColorBrush(Colors.Transparent);
}
You've successfully created a WPF or Silverlight application with a C1PdfDocument object.